package com.zjl.SpringBoot.第21章_流式_响应式_编程.C_Reactive响应式核心;

import org.junit.Test;
import reactor.core.publisher.Flux;

/**
 * 自定义流中元素的处理
 */
public class D7_Flux自定义 {

    @Test
    public void handle() {
       Flux.range(1,10)
               .handle((value,sink) -> {
                   System.out.println("拿到：" + value);
                   String valueNew = "我是：" + value;
                   sink.next(valueNew);
               })
               .log().subscribe();
    }

}
